<template>
  <zm-body class="panel-container">
    <div class="panel-container-col1">
      <zm-box4 title="岗位评价">
        <div class="filter-header">
          <el-form :inline="true" size="mini" :model="filterForm">
            <el-form-item label="考核周期">
              <el-date-picker
                      v-model="filterForm.month"
                      type="month"
                      style="width:110px"
                      placeholder="选择月"
              ></el-date-picker>
            </el-form-item>
            <!--            <el-form-item label="岗位类别">-->
            <!--              <el-select v-model="filterForm.type" style="width:110px" placeholder="岗位类别">-->
            <!--                <el-option-->
            <!--                  :label="item.label"-->
            <!--                  :value="item.value"-->
            <!--                  :key="item.value"-->
            <!--                  v-for="(item) in typeOptions"-->
            <!--                ></el-option>-->
            <!--              </el-select>-->
            <!--            </el-form-item>-->
            <el-form-item label="区域">
              <el-select v-model="filterForm.region" style="width:110px" placeholder="南法信镇">
                <el-option
                        :label="item.label"
                        :value="item.value"
                        :key="item.value"
                        v-for="(item) in areaOptions"
                ></el-option>
              </el-select>
            </el-form-item>
            <el-form-item>
              <el-button type="default" @click="onFilterHandler">查询</el-button>
            </el-form-item>
          </el-form>
        </div>
        <div class="data-table-list">
          <!-- 列表 -->
          <el-table
                  size="small"
                  fit
                  :data="table1data"
                  style="width: 100%"
                  v-loading="table1dataLoading"
          >
            <el-table-column prop="ranking" align="center" label="排名" min-width="8%">
              <template slot-scope="{row,$index}">
                <span v-if="$index<=2">
                  <img width="26" :src="`images/rank-${$index+1}.svg`" alt />
                </span>
                <span v-else class="f14">{{$index+1}}</span>
              </template>
            </el-table-column>
            <el-table-column prop="ranking" label="趋势" min-width="8%">
              <template slot-scope="{row,$index}">
                <i class="iconfont icon-up color-success f12" v-if="row.rankingChange>0"></i>
                <span v-else-if="row.rankingChange==0">---</span>
                <i class="iconfont icon-down color-danger f12" v-else></i>
                <span v-if="row.rankingChange!=0">{{Math.abs(row.rankingChange)}}</span>
              </template>
            </el-table-column>
            <el-table-column prop="monitor" label="人员" min-width="10%"></el-table-column>
            <el-table-column prop="department" label="部门" min-width="9%"></el-table-column>
            <el-table-column prop="reportNum" align="center" label="上报数" min-width="10%">
              <template slot-scope="{row}">
                <a
                        href="javascript:;"
                        v-if="row.reportNum"
                        @click="caseNumClickHandler(row)"
                >{{row.reportNum}}</a>
                <span v-else>{{row.reportNum}}</span>
              </template>
            </el-table-column>
            <el-table-column prop="effectiveReportNum" align="center" label="有效上报数" min-width="10%">
              <template slot-scope="{row}">
                <a
                        href="javascript:;"
                        v-if="row.effectiveReportNum"
                        @click="caseNumClickHandler1(row)"
                >{{row.effectiveReportNum}}</a>
                <span v-else>{{row.effectiveReportNum}}</span>
              </template>
            </el-table-column>
            <el-table-column
                    prop="effectiveReportpercent"
                    align="center"
                    label="有效上报率"
                    min-width="10%"
            >
              <template slot-scope="{row}">{{row.effectiveReportpercent}}%</template>
            </el-table-column>
            <el-table-column prop="verifyRate" align="center" label="按期核实率" min-width="11%">
              <template slot-scope="{row}">{{row.verifyRate}}%</template>
            </el-table-column>
            <el-table-column prop="VerificationRate" align="center" label="按期核查率" min-width="11%">
              <template slot-scope="{row}">{{row.VerificationRate}}%</template>
            </el-table-column>
            <el-table-column prop="scores" align="center" label="综合得分" min-width="10%"></el-table-column>
          </el-table>
        </div>
      </zm-box4>
    </div>
    <div class="panel-container-col2">
      <zm-box4 title="上报数排行" class="mb20">
        <el-table
                size="small"
                fit
                :data="table2data"
                style="width: 100%"
                v-loading="table2dataLoading"
        >
          <el-table-column prop="ranking" align="center" label="排名" width="50">
            <template slot-scope="{row,$index}">
              <span v-if="$index<=2">
                <img width="22" :src="`images/rank-${$index+1}.svg`" alt />
              </span>
              <span v-else class="f14">{{$index+1}}</span>
            </template>
          </el-table-column>
          <el-table-column prop="monitor" label="考核人员"></el-table-column>
          <el-table-column prop="reportNum" align="center" label="上报数" width="100"></el-table-column>
          <el-table-column prop="ranking" label="趋势" width="80">
            <template slot-scope="{row,$index}">
              <i class="iconfont icon-up color-success f12" v-if="row.rankingChange>0"></i>
              <i class="iconfont icon-down color-danger f12" v-else></i>
              {{Math.abs(row.rankingChange)}}
            </template>
          </el-table-column>
        </el-table>
      </zm-box4>
      <zm-box4 title="按期核实率排行">
        <el-table
                size="small"
                fit
                :data="table3data"
                style="width: 100%"
                v-loading="table3dataLoading"
        >
          <el-table-column prop="ranking" align="center" label="排名" width="50">
            <template slot-scope="{row,$index}">
              <span v-if="$index<=2">
                <img width="22" :src="`images/rank-${$index+1}.svg`" alt />
              </span>
              <span v-else class="f14">{{$index+1}}</span>
            </template>
          </el-table-column>
          <el-table-column prop="monitor" label="考核人员"></el-table-column>
          <el-table-column prop="verifyRate" align="center" label="按期核实率" width="100">
            <template slot-scope="{row}">{{row.verifyRate}}%</template>
          </el-table-column>
          <el-table-column prop="ranking" label="趋势" width="80">
            <template slot-scope="{row,$index}">
              <i class="iconfont icon-up color-success f12" v-if="row.rankingChange>0"></i>
              <i class="iconfont icon-down color-danger f12" v-else></i>
              {{Math.abs(row.rankingChange)}}
            </template>
          </el-table-column>
        </el-table>
      </zm-box4>
    </div>
    <div class="panel-container-col3">
      <zm-box4 title="有效上报率排行" class="mb20">
        <el-table
                size="small"
                fit
                :data="table4data"
                style="width: 100%"
                v-loading="table4dataLoading"
        >
          <el-table-column prop="ranking" align="center" label="排名" width="50">
            <template slot-scope="{row,$index}">
              <span v-if="$index<=2">
                <img width="22" :src="`images/rank-${$index+1}.svg`" alt />
              </span>
              <span v-else class="f14">{{$index+1}}</span>
            </template>
          </el-table-column>
          <el-table-column prop="monitor" label="考核人员"></el-table-column>
          <el-table-column prop="effectiveReportPercent" align="center" label="有效上报率" width="100">
            <template slot-scope="{row}">{{row.effectiveReportPercent}}%</template>
          </el-table-column>
          <el-table-column prop="ranking" label="趋势" width="80">
            <template slot-scope="{row,$index}">
              <i class="iconfont icon-up color-success f12" v-if="row.rankingChange>0"></i>
              <i class="iconfont icon-down color-danger f12" v-else></i>
              {{Math.abs(row.rankingChange)}}
            </template>
          </el-table-column>
        </el-table>
      </zm-box4>
      <zm-box4 title="按期核查率排行">
        <el-table
                size="small"
                fit
                :data="table5data"
                style="width: 100%"
                v-loading="table5dataLoading"
        >
          <el-table-column prop="ranking" align="center" label="排名" width="50">
            <template slot-scope="{row,$index}">
              <span v-if="$index<=2">
                <img width="22" :src="`images/rank-${$index+1}.svg`" alt />
              </span>
              <span v-else class="f14">{{$index+1}}</span>
            </template>
          </el-table-column>
          <el-table-column prop="monitor" label="考核人员"></el-table-column>
          <el-table-column prop="VerificationRate" align="center" label="按期核查率" width="100">
            <template slot-scope="{row}">{{row.VerificationRate}}%</template>
          </el-table-column>
          <el-table-column prop="ranking" label="趋势" width="80">
            <template slot-scope="{row,$index}">
              <i class="iconfont icon-up color-success f12" v-if="row.rankingChange>0"></i>
              <i class="iconfont icon-down color-danger f12" v-else></i>
              {{Math.abs(row.rankingChange)}}
            </template>
          </el-table-column>
        </el-table>
      </zm-box4>
    </div>
    <el-dialog title="案件列表" :visible.sync="showTable"
               append-to-body
               :close-on-click-modal="false"
               :modal="false"
               custom-class="el-dragable-dialog default-on-right "
               v-el-drag-dialog
               width="80%">
      <el-table
              :data="ajtableData"
              style="width: 100%"
              height="500">
        <el-table-column
                prop="RWH"
                label="任务号"
                width="180">
        </el-table-column>
        <el-table-column
                prop="AJZT"
                label="案件状态"
                width="180">
        </el-table-column>
        <el-table-column
                prop="WTDJ"
                label="问题等级"
                width="180">
        </el-table-column>
        <el-table-column
                prop="WTLX"
                label="问题类型"
                width="180">
        </el-table-column>
        <el-table-column
                prop="AJLX"
                label="案件类型"
                width="180">
        </el-table-column>
        <el-table-column
                prop="WTLY"
                label="问题来源"
                width="180">
        </el-table-column>
        <el-table-column
                prop="DL"
                label="大类"
                width="180">
        </el-table-column>
        <el-table-column
                prop="XL"
                label="小类"
                width="180">
        </el-table-column>
        <el-table-column
                prop="SQ"
                label="社区"
                width="180">
        </el-table-column>
        <el-table-column
                prop="WZ"
                label="案件位置"
                width="180">
        </el-table-column>
        <el-table-column
                prop="WTMS"
                label="问题描述"
                width="280">
        </el-table-column>
      </el-table>
    </el-dialog>
  </zm-body>
</template>

<script>
  /*
     功能模块  综合评价-岗位评价
     创建人    zgf
     更新时间  2020/04/14
     备注
  */
  import elDragDialog from "@/directive/el-drag-dialog"; // base on element-ui
  export default {
    directives: { elDragDialog },
    name: "EvaluationIndex",
    data() {
      return {
        showFilterBody: false,
        filterForm: {
          month: "",
          type: "",
          region: ""
        },
        typeOptions: [],
        areaOptions: [],
        table1data: [],
        table1dataLoading: false,
        table2data: [],
        table2dataLoading: false,
        table3data: [],
        table3dataLoading: false,
        table4data: [],
        table4dataLoading: false,
        table5data: [],
        table5dataLoading: false,
        showTable: false,
        ajtableData: []
      };
    },
    created(){
      let yf =  new Date().getFullYear()+"-"+((new Date().getMonth()+1)<10?"0"+(new Date().getMonth()+1):(new Date().getMonth()+1))
      this.getData(yf)
    },
    mounted() {
      this.getPageData();
      // this.getTable1Data();
      // this.getTable2Data();
      // this.getTable3Data();
      // this.getTable4Data();
      // this.getTabl54Data();
    },
    methods: {
      //页面需要的一些数据字典类数据获取
      getPageData() {
        setTimeout(() => {
          this.typeOptions = [
            { value: 0, label: "监督员" }
          ];
          this.areaOptions = [
            { value: 0, label: "南法信镇" }
          ];
        });
      },
      //获取表格数据  岗位评价
      getTable1Data() {
        // this.table1dataLoading = true;
        setTimeout(() => {
          this.table1dataLoading = false;
          this.table1data = [
            {
              id: "000001",
              monitor: "张文文",
              department: "检查组",
              reportNum: 564,
              effectiveReportNum: 235,
              effectiveReportpercent: 0.88,
              verifyRate: 0.95,
              VerificationRate: 0.96,
              scores: 88,
              ranking: 3,
              rankingChange: -12
            },
            {
              id: "000001",
              monitor: "张文文",
              department: "检查组",
              reportNum: 564,
              effectiveReportNum: 235,
              effectiveReportpercent: 0.88,
              verifyRate: 0.95,
              VerificationRate: 0.96,
              scores: 88,
              ranking: 3,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              department: "检查组",
              reportNum: 564,
              effectiveReportNum: 235,
              effectiveReportpercent: 0.88,
              verifyRate: 0.95,
              VerificationRate: 0.96,
              scores: 88,
              ranking: 3,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              department: "检查组",
              reportNum: 564,
              effectiveReportNum: 235,
              effectiveReportpercent: 0.88,
              verifyRate: 0.95,
              VerificationRate: 0.96,
              scores: 88,
              ranking: 3,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              department: "检查组",
              reportNum: 564,
              effectiveReportNum: 235,
              effectiveReportpercent: 0.88,
              verifyRate: 0.95,
              VerificationRate: 0.96,
              scores: 88,
              ranking: 3,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              department: "检查组",
              reportNum: 564,
              effectiveReportNum: 235,
              effectiveReportpercent: 0.88,
              verifyRate: 0.95,
              VerificationRate: 0.96,
              scores: 88,
              ranking: 3,
              rankingChange: 0
            },
            {
              id: "000001",
              monitor: "张文文",
              department: "检查组",
              reportNum: 564,
              effectiveReportNum: 235,
              effectiveReportpercent: 0.88,
              verifyRate: 0.95,
              VerificationRate: 0.96,
              scores: 88,
              ranking: 3,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              department: "检查组",
              reportNum: 564,
              effectiveReportNum: 235,
              effectiveReportpercent: 0.88,
              verifyRate: 0.95,
              VerificationRate: 0.96,
              scores: 88,
              ranking: 3,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              department: "检查组",
              reportNum: 564,
              effectiveReportNum: 235,
              effectiveReportpercent: 0.88,
              verifyRate: 0.95,
              VerificationRate: 0.96,
              scores: 88,
              ranking: 3,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              department: "检查组",
              reportNum: 564,
              effectiveReportNum: 235,
              effectiveReportpercent: 0.88,
              verifyRate: 0.95,
              VerificationRate: 0.96,
              scores: 88,
              ranking: 3,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              department: "检查组",
              reportNum: 564,
              effectiveReportNum: 235,
              effectiveReportpercent: 0.88,
              verifyRate: 0.95,
              VerificationRate: 0.96,
              scores: 88,
              ranking: 3,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              department: "检查组",
              reportNum: 564,
              effectiveReportNum: 235,
              effectiveReportpercent: 0.88,
              verifyRate: 0.95,
              VerificationRate: 0.96,
              scores: 88,
              ranking: 3,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              department: "检查组",
              reportNum: 564,
              effectiveReportNum: 235,
              effectiveReportpercent: 0.88,
              verifyRate: 0.95,
              VerificationRate: 0.96,
              scores: 88,
              ranking: 3,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              department: "检查组",
              reportNum: 564,
              effectiveReportNum: 235,
              effectiveReportpercent: 0.88,
              verifyRate: 0.95,
              VerificationRate: 0.96,
              scores: 88,
              ranking: 3,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              department: "检查组",
              reportNum: 564,
              effectiveReportNum: 235,
              effectiveReportpercent: 0.88,
              verifyRate: 0.95,
              VerificationRate: 0.96,
              scores: 88,
              ranking: 3,
              rankingChange: +9
            }
          ];
        }, 0);
      },
      //table2数据获取 上报数排行
      getTable2Data() {
        // this.table2dataLoading = true;
        setTimeout(() => {
          this.table2dataLoading = false;
          this.table2data = [
            {
              id: "000001",
              monitor: "张文文",
              reportNum: 564,
              rankingChange: -12
            },
            {
              id: "000001",
              monitor: "张文文",
              reportNum: 564,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              reportNum: 564,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              reportNum: 564,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              reportNum: 564,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              reportNum: 564,
              rankingChange: 0
            },
            {
              id: "000001",
              monitor: "张文文",
              reportNum: 564,
              rankingChange: +9
            },
            {
              id: "000001",
              department: "检查组",
              reportNum: 564,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              reportNum: 564,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              reportNum: 564,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              reportNum: 564,
              rankingChange: +9
            },
            {
              id: "000001",
              department: "检查组",
              reportNum: 564,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              reportNum: 564,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              reportNum: 564,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              reportNum: 564,
              rankingChange: +9
            }
          ];
        }, 0);
      },
      //table3数据获取 按期核实率排行
      getTable3Data() {
        // this.table3dataLoading = true;
        setTimeout(() => {
          this.table3dataLoading = false;
          this.table3data = [
            {
              id: "000001",
              monitor: "张文文",
              verifyRate: 0.95,
              rankingChange: -12
            },
            {
              id: "000001",
              monitor: "张文文",
              verifyRate: 0.95,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              verifyRate: 0.95,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              verifyRate: 0.95,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              verifyRate: 0.95,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              verifyRate: 0.95,
              rankingChange: 0
            },
            {
              id: "000001",
              monitor: "张文文",
              verifyRate: 0.95,
              rankingChange: +9
            },
            {
              id: "000001",
              department: "检查组",
              verifyRate: 0.95,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              verifyRate: 0.95,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              verifyRate: 0.95,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              verifyRate: 0.95,
              rankingChange: +9
            },
            {
              id: "000001",
              department: "检查组",
              verifyRate: 0.95,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              verifyRate: 0.95,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              verifyRate: 0.95,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              verifyRate: 0.95,
              rankingChange: +9
            }
          ];
        }, 0);
      },
      //table4数据获取  有效上报率排行
      getTable4Data() {
        // this.table4dataLoading = true;
        setTimeout(() => {
          this.table4dataLoading = false;
          this.table4data = [
            {
              id: "000001",
              monitor: "张文文",
              effectiveReportPercent: 0.95,
              rankingChange: -12
            },
            {
              id: "000001",
              monitor: "张文文",
              effectiveReportPercent: 0.95,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              effectiveReportPercent: 0.95,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              effectiveReportPercent: 0.95,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              effectiveReportPercent: 0.95,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              effectiveReportPercent: 0.95,
              rankingChange: 0
            },
            {
              id: "000001",
              monitor: "张文文",
              effectiveReportPercent: 0.95,
              rankingChange: +9
            },
            {
              id: "000001",
              department: "检查组",
              effectiveReportPercent: 0.95,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              effectiveReportPercent: 0.95,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              effectiveReportPercent: 0.95,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              effectiveReportPercent: 0.95,
              rankingChange: +9
            },
            {
              id: "000001",
              department: "检查组",
              effectiveReportPercent: 0.95,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              effectiveReportPercent: 0.95,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              effectiveReportPercent: 0.95,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              effectiveReportPercent: 0.95,
              rankingChange: +9
            }
          ];
        }, 0);
      },
      //table5数据获取  按期核查率排行
      getTabl54Data() {
        // this.table5dataLoading = true;
        setTimeout(() => {
          this.table5dataLoading = false;
          this.table5data = [
            {
              id: "000001",
              monitor: "张文文",
              VerificationRate: 0.95,
              rankingChange: -12
            },
            {
              id: "000001",
              monitor: "张文文",
              VerificationRate: 0.95,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              VerificationRate: 0.95,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              VerificationRate: 0.95,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              VerificationRate: 0.95,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              VerificationRate: 0.95,
              rankingChange: 0
            },
            {
              id: "000001",
              monitor: "张文文",
              VerificationRate: 0.95,
              rankingChange: +9
            },
            {
              id: "000001",
              department: "检查组",
              VerificationRate: 0.95,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              VerificationRate: 0.95,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              VerificationRate: 0.95,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              VerificationRate: 0.95,
              rankingChange: +9
            },
            {
              id: "000001",
              department: "检查组",
              VerificationRate: 0.95,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              VerificationRate: 0.95,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              VerificationRate: 0.95,
              rankingChange: +9
            },
            {
              id: "000001",
              monitor: "张文文",
              VerificationRate: 0.95,
              rankingChange: +9
            }
          ];
        }, 0);
      },
      onFilterHandler() {
        if(this.filterForm.month == ""){
          this.$alert('请选择月份', this.getTitle.title, {
            confirmButtonText: '确定'
          });
          return false
        }
        let d = this.filterForm.month
        let yf = d.getFullYear()+"-"+((d.getMonth()+1)<10?"0"+(d.getMonth()+1):(d.getMonth()+1))
        this.getData(yf);
      },
      getData(yf){
        this.table1dataLoading = true;
        this.table2dataLoading = true;
        this.table3dataLoading = true;
        this.table4dataLoading = true;
        this.table5dataLoading = true;
        this.table1data = []
        this.table2data = []
        this.table3data = []
        this.table4data = []
        this.table5data = []
        this.$http.get(this.baseUrl.gwpj, {
          params: {
            yf: yf
          }
        }).then((rel)=>{
          debugger
          let zhdf = rel.data.ZHDF//岗位评价
          let aqhcl = rel.data.AQHCL//按期核查率
          let aqhsl = rel.data.AQHSL//按期核实率
          let sbs = rel.data.SBS//上报数
          let yxsbl = rel.data.YXSBL//有效上报率
          //岗位评价
          for(let i=0;i<zhdf.length;i++){
            this.table1data.push({
              id: i+1,
              monitor: zhdf[i].HUMANNAME,
              department: zhdf[i].UNITNAME.split("网格员"),
              reportNum: zhdf[i].SBS,
              effectiveReportNum: zhdf[i].YXSBS,
              effectiveReportpercent: zhdf[i].YXSBL,
              verifyRate: zhdf[i].AQHSL,
              VerificationRate: zhdf[i].AQHCL,
              scores: zhdf[i].ZHDF,
              rankingChange: zhdf[i].PMQS,
            })
          }
          //上报数排行
          for(let i=0;i<sbs.length;i++){
            this.table2data.push(
                    {
                      id: i+1,
                      monitor: sbs[i].HUMANNAME,
                      reportNum: sbs[i].SBS,
                      rankingChange:sbs[i].PMQS,
                    }
            )
          }
          //按期核实率
          for (let i = 0; i < aqhsl.length; i++) {
            this.table3data.push(
                    {
                      id: i+1,
                      monitor: aqhsl[i].HUMANNAME,
                      verifyRate: aqhsl[i].AQHSL,
                      rankingChange:aqhsl[i].PMQS
                    })
          }
          //有效上报率
          for (let i = 0; i < yxsbl.length; i++) {
            this.table4data.push(
                    {
                      id: i+1,
                      monitor: yxsbl[i].HUMANNAME,
                      effectiveReportPercent: yxsbl[i].YXSBL,
                      rankingChange: yxsbl[i].PMQS,
                    }
            )
          }
          //按期核查率
          for (let i = 0; i < aqhcl.length; i++) {
            this.table5data.push(
                    {
                      id: i+1,
                      monitor: aqhcl[i].HUMANNAME,
                      VerificationRate: aqhcl[i].AQHCL,
                      rankingChange: aqhcl[i].PMQS,
                    }
            )
          }
          this.table1dataLoading = false;
          this.table2dataLoading = false;
          this.table3dataLoading = false;
          this.table4dataLoading = false;
          this.table5dataLoading = false;
        }).catch((e)=>{
          console.log(e)
          this.table1dataLoading = false;
          this.table2dataLoading = false;
          this.table3dataLoading = false;
          this.table4dataLoading = false;
          this.table5dataLoading = false;
        })
      },
      caseNumClickHandler(row){
        let year = ""
        let month = ""
        if(this.filterForm.month){
          year = this.filterForm.month.getFullYear()
          month = this.filterForm.month.getMonth()+1
        }else{
          let d = new Date()
          year = d.getFullYear()
          month = d.getMonth() + 1
        }
        let ddd = runSQLJd("select * from ajdj where sbr = '"+row.monitor+"' and sbsj between to_date('"+year+"-"+month+"-01','YYYY-mm-dd') and to_date('"+year+"-"+(month+1)+"-01','YYYY-mm-dd');")
        debugger
        if(ddd[0].length){
          this.ajtableData = ddd[0]
        }
        this.showTable = true
      },
      caseNumClickHandler1(row){
        let year = ""
        let month = ""
        if(this.filterForm.month){
          year = this.filterForm.month.getFullYear()
          month = this.filterForm.month.getMonth()+1
        }else{
          let d = new Date()
          year = d.getFullYear()
          month = d.getMonth() + 1
        }
        let ddd = runSQLJd("select * from ajdj where sbr = '"+row.monitor+"' and sbsj between to_date('"+year+"-"+month+"-01','YYYY-mm-dd') and to_date('"+year+"-"+(month+1)+"-01','YYYY-mm-dd') and ajzt <> '已作废';")
        debugger
        if(ddd[0].length){
          this.ajtableData = ddd[0]
        }
        this.showTable = true
      }
    }
  };
</script>

<style lang="less" scoped>
  @import "../../css/mixin.less";
  .el-dragable-dialog{
    position: fixed !important;
    &.el-dialog{
      width: 100%;
      margin-left: -180px;
      left: 50%;
      margin-top: 0;
      top: 4rem;
      .el-dialog__body{
        max-height: calc(100vh - 5rem - 100px);
        overflow-y: auto;
        .nativeScroll()
      }
    }
    &.default-on-right{
      &.el-dialog{
        left: auto;
        right: 20px;
      }
    }
  }
</style>
